#include "finish.h"
#include "ui_finish.h"

#include <QDebug>

Finish::Finish(QWidget *parent) :
    Base(parent),
    ui(new Ui::Finish)
{
    ui->setupUi(this);

    ui->finish_Txe->setText(tr("The Found desktop operating system has been successfully installed on your computer.\n"
                            "You can choose to restart immediately to start using, or shut down and manually restart later.\n"));

    ui->reboot_Txe->setText(tr("To ensure that the system can boot up properly from the hard drive, please unplug the installation media now."
                               "After unplugging, please click the button below or press the Enter key to continue restarting the system."));
}

Finish::~Finish()
{
    delete ui;
}

bool Finish::nextStep()
{
    if (ui->stackedWidget->currentIndex() == 1) {
        // TODO call login1 Reboot;
        qInfo() << "----do reboot";
        return false;
    }
    return true;
}

void Finish::onContinueReboot()
{
    ui->stackedWidget->setCurrentIndex(1);
}
